package com.peanut.baby.widget.im;

import android.content.Context;
import android.widget.BaseAdapter;
import android.widget.TextView;

public class EaseChatRowText extends EaseChatRow{

	private TextView contentView;

    public EaseChatRowText(Context context, int position, BaseAdapter adapter) {
		super(context, position, adapter);
	}

	@Override
	protected void onInflateView() {
//		inflater.inflate(message.direct() == EMMessage.Direct.RECEIVE ?
//				R.layout.ease_row_received_message : R.layout.ease_row_sent_message, this);
	}

	@Override
	protected void onFindViewById() {
//		contentView = (TextView) findViewById(R.id.tv_chatcontent);
	}

    @Override
    public void onSetUpView() {
//        EMTextMessageBody txtBody = (EMTextMessageBody) message.getBody();
//        contentView.setText(txtBody.getMessage());

        handleTextMessage();
    }

    protected void handleTextMessage() {
//        if (message.direct() == EMMessage.Direct.SEND) {
//            setMessageSendCallback();
//            switch (message.status()) {
//            case CREATE:
//                progressBar.setVisibility(View.GONE);
//                statusView.setVisibility(View.VISIBLE);
//                break;
//            case SUCCESS:
//                progressBar.setVisibility(View.GONE);
//                statusView.setVisibility(View.GONE);
//                break;
//            case FAIL:
//                progressBar.setVisibility(View.GONE);
//                statusView.setVisibility(View.VISIBLE);
//                break;
//            case INPROGRESS:
//                progressBar.setVisibility(View.VISIBLE);
//                statusView.setVisibility(View.GONE);
//                break;
//            default:
//               break;
//            }
//        }else{
//            if(!message.isAcked() && message.getChatType() == ChatType.Chat){
//                try {
//                    EMClient.getInstance().chatManager().ackMessageRead(message.getFrom(), message.getMsgId());
//                } catch (HyphenateException e) {
//                    e.printStackTrace();
//                }
//            }
//        }
    }

    @Override
    protected void onUpdateView() {
        adapter.notifyDataSetChanged();
    }

    @Override
    protected void onBubbleClick() {
        // TODO Auto-generated method stub
        
    }



}
